---
title: "SQL-020: Retrieve assigned attorney's manager email address"
summary: Retrieve the assigned attorney's manager email address via an inline scalar PL/SQL function call.
status: draft
owner: SAIF Documentation Pipeline
last_reviewed: 2026-08-21
library: SAIF.Application.Claim.Legal
reference_type: embedded
---

# SQL-020 Retrieve assigned attorney's manager email address

Scalar query that invokes the `pk80001_LEGALNET.get_atty_mngr_email` PL/SQL function via a scalar query against `DUAL` to look up the email address of the assigned attorney's manager, for a Defense Evaluation Form (DEF) reminder email. Invoked from `clsScheduleManager.SendDEFEmail`.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-020 |
| **Operation type** | Read |
| **Execution method** | Inline SQL, runtime string concatenation, scalar function call (`SqlHelper.ScalarQuery(Of String)`) |
| **Database** | Oracle |
| **Command type** | Text |
| **Business object** | N/A (Application layer) |
| **Criteria property** | N/A (Application layer) |
| **Lifecycle method** | N/A (Application layer) |
| **Application class** | `clsScheduleManager` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `caseSeqNum` | N/A — concatenated literal, not a bind parameter* | Decimal (`& caseSeqNum &`) | N/A | Case sequence number concatenated directly into the SQL text (see Sample SQL below) rather than bound via `:ParamName` — same pattern/caveat as [SQL-019](SQL-019-appeal-num-level-list.md)*. |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [DUAL](../database-tables.md#dual) | SELECT | N/A (pseudo-table; scalar function target) |

The `pk80001_LEGALNET.get_atty_mngr_email` PL/SQL function body resides in the Oracle database and was not retrieved for this run (see [Procedures](../procedures/index.md)).

## Sample SQL

```sql
-- caseSeqNum is concatenated directly into the SQL text at runtime (not an Oracle bind variable)
SELECT pk80001_LEGALNET.get_atty_mngr_email(<caseSeqNum>)
FROM DUAL
```

`<caseSeqNum>` denotes runtime string concatenation (`"select pk80001_LEGALNET.get_atty_mngr_email(" & caseSeqNum & ") from dual"`), not an Oracle bind variable*. This is a PL/SQL function invoked inline within a scalar query; the function body resides in the Oracle database and was not retrieved for this run.

## Operations and processes
- [Send DEF email reminder](../operations/send-def-email-reminder.md)

## Business rules
- [BR-LGL-005: Non-Production DEF email reminders are redirected to the current user](../business-rules.md#br-lgl-005-non-production-def-email-reminders-are-redirected-to-the-current-user)*

> **Note:** Statements marked with `*` were inferred from code structure, naming
> conventions, or contextual evidence where direct confirmation was not available
> in source artifacts. Statements marked with `**` could not be confirmed; treat
> as unknown until verified.

## Sources
- `SAIF.Application.Claim.Legal\LegalNet\clsScheduleManager.vb`
